package com.kittlen.managementSystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.kittlen.managementSystem.entity.MySqlLimit;
import com.kittlen.managementSystem.entity.Vehicle;
import com.kittlen.managementSystem.mapper.VehicleMapper;
import com.kittlen.managementSystem.service.IVehicleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 车辆表 服务实现类
 * </p>
 *
 * @author kittlen
 * @since 2021-01-26
 */
@Service
public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> implements IVehicleService {

    @Override
    public List<Vehicle> selects(Wrapper wrapper) {
        return baseMapper.selects(wrapper);
    }

    /**
     * 车辆批量添加
     * @param list
     * @return
     */
    @Override
    public int batchInsert(List<Vehicle> list) {
        return baseMapper.batchInsert(list);
    }

    @Override
    public boolean save(Vehicle vehicle) {
        return baseMapper.insert(vehicle)>0;
    }

    @Override
    public int count(Wrapper<Vehicle> queryWrapper) {
        return baseMapper.count(queryWrapper);
    }
}
